How to find the depth of a dictionary that contains a list of dictionaries